package Generic;

/**
 * Created by ZC_zc on 2016/11/7.
 */
public class Bounds<T extends Number> {

    T[] nums;

    Bounds(T[] o){
        nums=o;
    }

    double average(){
        double sum=0;

        for (int i=0;i<nums.length;i++){
            sum=sum+nums[i].doubleValue();
        }
        return  sum/nums.length;
    }
}
